Skip to content

NodeEditor: Display GroupAttribute as collapsible sections instead of nested key/value pairs#3069

Open
Copilot wants to merge 2 commits intodevelopfrom
copilot/refactor-key-value-presentation
Open

NodeEditor: Display GroupAttribute as collapsible sections instead of nested key/value pairs#3069
Copilot wants to merge 2 commits intodevelopfrom
copilot/refactor-key-value-presentation

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 1, 2026

Grouped attributes in the NodeEditor were rendered as nested key/value structures, repeating hierarchy labels and wasting vertical space. This replaces that with collapsible section headers containing child attributes directly.

Description

GroupAttribute entries are now displayed as collapsible section headers (expand/collapse toggle + bold group name) with their children listed below, indented, instead of a flat key → nested-key/value layout. Groups expand by default; users can collapse to reclaim space.

Features list

  • GroupAttribute rendered as a collapsible section (chevron toggle + bold label with tooltip) instead of nested key/value pairs
  • Left label pane hidden for GroupAttribute rows so the section header spans full row width
  • Child AttributeEditor indented (8 px left margin) and collapsed/expanded in sync with the section toggle
  • labelWidth propagated from parent instead of hardcoded 100
  • showInViewer signal now forwarded from nested AttributeEditor (was missing)
  • Fixed attributeDoubleClicked handler to correctly pass both mouse and attr (previously mouse was silently dropped)

Implementation remarks

groupAttributeComponent in AttributeItemDelegate.qml is replaced with a ColumnLayout containing a static header RowLayout and a dynamically-created AttributeEditor (dynamic creation retained to avoid the existing circular-import between AttributeItemDelegateAttributeEditor). The child editor's visible is bound to groupItem.expanded so the ColumnLayout naturally excludes it from height calculation when collapsed.

The left label Pane gains visible: attribute.type !== "GroupAttribute" so it is excluded from the RowLayout layout, letting the group component fill full width without a redundant label column.

…value pairs

Agent-Logs-Url: https://github.com/alicevision/Meshroom/sessions/0e1e67f7-0a33-454b-8a0b-eb604b999520

Co-authored-by: fabiencastan <153585+fabiencastan@users.noreply.github.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 30, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.47%. Comparing base (bde64b0) to head (4932411).
⚠️ Report is 76 commits behind head on develop.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3069      +/-   ##
===========================================
+ Coverage    83.40%   83.47%   +0.07%     
===========================================
  Files           73       81       +8     
  Lines         9870    10301     +431     
===========================================
+ Hits          8232     8599     +367     
- Misses        1638     1702      +64     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@nicolas-lambert-tc nicolas-lambert-tc marked this pull request as ready for review April 30, 2026 15:50
Copilot AI review requested due to automatic review settings April 30, 2026 15:50
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates NodeEditor attribute rendering so GroupAttribute entries appear as collapsible section headers with indented child attributes, reducing repeated hierarchy labels and vertical space usage.

Changes:

  • Hide the left label pane for GroupAttribute rows so the group header can span the full row.
  • Replace nested key/value group rendering with a collapsible header + nested AttributeEditor column.
  • Forward missing nested signals (showInViewer) and fix nested double-click forwarding to pass both mouse and attr.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +843 to +848
MouseArea {
id: labelMA
anchors.fill: parent
hoverEnabled: true
onClicked: groupItem.expanded = !groupItem.expanded
onDoubleClicked: function(mouse) { root.doubleClicked(mouse, root.attribute) }
Comment on lines 807 to +814
ColumnLayout {
id: groupItem
Component.onCompleted: {
spacing: 0
property bool expanded: true

RowLayout {
Layout.fillWidth: true
spacing: 0
Comment on lines 856 to 863
{
'model': Qt.binding(function() { return attribute.value }),
'readOnly': Qt.binding(function() { return root.readOnly }),
'labelWidth': 100, // Reduce label width for children (space gain)
'labelWidth': Qt.binding(function() { return root.labelWidth }),
'objectsHideable': Qt.binding(function() { return root.objectsHideable }),
'filterText': Qt.binding(function() { return root.filterText }),
'visible': Qt.binding(function() { return groupItem.expanded }),
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants